3.4.81 \(\int (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\) [381]

3.4.81.1 Optimal result
3.4.81.2 Mathematica [A] (verified)
3.4.81.3 Rubi [A] (verified)
3.4.81.4 Maple [A] (verified)
3.4.81.5 Fricas [A] (verification not implemented)
3.4.81.6 Sympy [A] (verification not implemented)
3.4.81.7 Maxima [A] (verification not implemented)
3.4.81.8 Giac [A] (verification not implemented)
3.4.81.9 Mupad [B] (verification not implemented)

3.4.81.1 Optimal result

Integrand size = 29, antiderivative size = 110 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=-((b f+a g) n x)+2 b g n^2 x-\frac {2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )^2}{4 b e g} \]

output
-(a*g+b*f)*n*x+2*b*g*n^2*x-2*b*g*n*(e*x+d)*ln(c*(e*x+d)^n)/e+x*(a+b*ln(c*( 
e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))+1/4*d*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))^2/b 
/e/g
 
3.4.81.2 Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.69 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {e (a (f-g n)+b n (-f+2 g n)) x+(a g+b (f-2 g n)) (d+e x) \log \left (c (d+e x)^n\right )+b g (d+e x) \log ^2\left (c (d+e x)^n\right )}{e} \]

input
Integrate[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
(e*(a*(f - g*n) + b*n*(-f + 2*g*n))*x + (a*g + b*(f - 2*g*n))*(d + e*x)*Lo 
g[c*(d + e*x)^n] + b*g*(d + e*x)*Log[c*(d + e*x)^n]^2)/e
 
3.4.81.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2878, 2858, 25, 27, 2788, 2009, 2738}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right ) \, dx\)

\(\Big \downarrow \) 2878

\(\displaystyle x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-e n \int \frac {x \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}dx\)

\(\Big \downarrow \) 2858

\(\displaystyle x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-n \int \frac {x \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)\)

\(\Big \downarrow \) 25

\(\displaystyle n \int -\frac {x \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {n \int -\frac {e x \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)}{e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 2788

\(\displaystyle \frac {n \left (d \int \frac {b f+a g+2 b g \log \left (c (d+e x)^n\right )}{d+e x}d(d+e x)-\int \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )d(d+e x)\right )}{e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {n \left (d \int \frac {b f+a g+2 b g \log \left (c (d+e x)^n\right )}{d+e x}d(d+e x)-((d+e x) (a g+b f))-2 b g (d+e x) \log \left (c (d+e x)^n\right )+2 b g n (d+e x)\right )}{e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 2738

\(\displaystyle x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac {n \left (\frac {d \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )^2}{4 b g n}-(d+e x) (a g+b f)-2 b g (d+e x) \log \left (c (d+e x)^n\right )+2 b g n (d+e x)\right )}{e}\)

input
Int[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]) + (n*(-((b*f + a*g 
)*(d + e*x)) + 2*b*g*n*(d + e*x) - 2*b*g*(d + e*x)*Log[c*(d + e*x)^n] + (d 
*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n])^2)/(4*b*g*n)))/e
 

3.4.81.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2738
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Lo 
g[c*x^n])^2/(2*b*n), x] /; FreeQ[{a, b, c, n}, x]
 

rule 2788
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.)) 
/(x_), x_Symbol] :> Simp[d   Int[(d + e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x) 
, x], x] + Simp[e   Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /; F 
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 

rule 2878
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.) 
*((d_) + (e_.)*(x_))^(n_.)]*(g_.)), x_Symbol] :> Simp[x*(a + b*Log[c*(d + e 
*x)^n])*(f + g*Log[c*(d + e*x)^n]), x] - Simp[e*n   Int[(x*(b*f + a*g + 2*b 
*g*Log[c*(d + e*x)^n]))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n} 
, x]
 
3.4.81.4 Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.05

method result size
norman \(\left (2 b g \,n^{2}-a g n -b f n +a f \right ) x +\left (-2 b g n +a g +b f \right ) x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )+b g x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {n \left (-2 d g b n +a d g +b d f \right ) \ln \left (e x +d \right )}{e}+\frac {d g b \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}\) \(116\)
parts \(x a f +\left (a g +b f \right ) \left (x \ln \left (c \left (e x +d \right )^{n}\right )-e n \left (\frac {x}{e}-\frac {d \ln \left (e x +d \right )}{e^{2}}\right )\right )+b g x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {d g b \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}+2 b g \,n^{2} x -\frac {2 n^{2} d g b \ln \left (e x +d \right )}{e}-2 b g n x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )\) \(131\)
default \(x a f +x a g \ln \left (c \left (e x +d \right )^{n}\right )-a g n x +\frac {a g n d \ln \left (e x +d \right )}{e}+x b \ln \left (c \left (e x +d \right )^{n}\right ) f -b f n x +\frac {b f n d \ln \left (e x +d \right )}{e}+b g x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {d g b \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}+2 b g \,n^{2} x -\frac {2 n^{2} d g b \ln \left (e x +d \right )}{e}-2 b g n x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )\) \(156\)
parallelrisch \(\frac {x \ln \left (c \left (e x +d \right )^{n}\right )^{2} b e g n -2 x \ln \left (c \left (e x +d \right )^{n}\right ) b e g \,n^{2}+2 x b e g \,n^{3}+x \ln \left (c \left (e x +d \right )^{n}\right ) a e g n +x \ln \left (c \left (e x +d \right )^{n}\right ) b e f n -x a e g \,n^{2}-x b e f \,n^{2}+\ln \left (c \left (e x +d \right )^{n}\right )^{2} b d g n -2 \ln \left (c \left (e x +d \right )^{n}\right ) b d g \,n^{2}-2 b d g \,n^{3}+x a e f n +\ln \left (c \left (e x +d \right )^{n}\right ) a d g n +\ln \left (c \left (e x +d \right )^{n}\right ) b d f n +a d g \,n^{2}+b d f \,n^{2}-a d f n}{e n}\) \(204\)
risch \(\text {Expression too large to display}\) \(1245\)

input
int((a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)
 
output
(2*b*g*n^2-a*g*n-b*f*n+a*f)*x+(-2*b*g*n+a*g+b*f)*x*ln(c*exp(n*ln(e*x+d)))+ 
b*g*x*ln(c*exp(n*ln(e*x+d)))^2+n*(-2*b*d*g*n+a*d*g+b*d*f)/e*ln(e*x+d)+d*g* 
b/e*ln(c*exp(n*ln(e*x+d)))^2
 
3.4.81.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.42 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {b e g x \log \left (c\right )^{2} + {\left (b e g n^{2} x + b d g n^{2}\right )} \log \left (e x + d\right )^{2} - {\left (2 \, b e g n - b e f - a e g\right )} x \log \left (c\right ) + {\left (2 \, b e g n^{2} + a e f - {\left (b e f + a e g\right )} n\right )} x - {\left (2 \, b d g n^{2} - {\left (b d f + a d g\right )} n + {\left (2 \, b e g n^{2} - {\left (b e f + a e g\right )} n\right )} x - 2 \, {\left (b e g n x + b d g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right )}{e} \]

input
integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fric 
as")
 
output
(b*e*g*x*log(c)^2 + (b*e*g*n^2*x + b*d*g*n^2)*log(e*x + d)^2 - (2*b*e*g*n 
- b*e*f - a*e*g)*x*log(c) + (2*b*e*g*n^2 + a*e*f - (b*e*f + a*e*g)*n)*x - 
(2*b*d*g*n^2 - (b*d*f + a*d*g)*n + (2*b*e*g*n^2 - (b*e*f + a*e*g)*n)*x - 2 
*(b*e*g*n*x + b*d*g*n)*log(c))*log(e*x + d))/e
 
3.4.81.6 Sympy [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.72 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} \frac {a d g \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + a f x - a g n x + a g x \log {\left (c \left (d + e x\right )^{n} \right )} + \frac {b d f \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {2 b d g n \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {b d g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{e} - b f n x + b f x \log {\left (c \left (d + e x\right )^{n} \right )} + 2 b g n^{2} x - 2 b g n x \log {\left (c \left (d + e x\right )^{n} \right )} + b g x \log {\left (c \left (d + e x\right )^{n} \right )}^{2} & \text {for}\: e \neq 0 \\x \left (a + b \log {\left (c d^{n} \right )}\right ) \left (f + g \log {\left (c d^{n} \right )}\right ) & \text {otherwise} \end {cases} \]

input
integrate((a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)
 
output
Piecewise((a*d*g*log(c*(d + e*x)**n)/e + a*f*x - a*g*n*x + a*g*x*log(c*(d 
+ e*x)**n) + b*d*f*log(c*(d + e*x)**n)/e - 2*b*d*g*n*log(c*(d + e*x)**n)/e 
 + b*d*g*log(c*(d + e*x)**n)**2/e - b*f*n*x + b*f*x*log(c*(d + e*x)**n) + 
2*b*g*n**2*x - 2*b*g*n*x*log(c*(d + e*x)**n) + b*g*x*log(c*(d + e*x)**n)** 
2, Ne(e, 0)), (x*(a + b*log(c*d**n))*(f + g*log(c*d**n)), True))
 
3.4.81.7 Maxima [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.50 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=-b e f n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} - a e g n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} + b g x \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + b f x \log \left ({\left (e x + d\right )}^{n} c\right ) + a g x \log \left ({\left (e x + d\right )}^{n} c\right ) - {\left (2 \, e n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {{\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n^{2}}{e}\right )} b g + a f x \]

input
integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="maxi 
ma")
 
output
-b*e*f*n*(x/e - d*log(e*x + d)/e^2) - a*e*g*n*(x/e - d*log(e*x + d)/e^2) + 
 b*g*x*log((e*x + d)^n*c)^2 + b*f*x*log((e*x + d)^n*c) + a*g*x*log((e*x + 
d)^n*c) - (2*e*n*(x/e - d*log(e*x + d)/e^2)*log((e*x + d)^n*c) + (d*log(e* 
x + d)^2 - 2*e*x + 2*d*log(e*x + d))*n^2/e)*b*g + a*f*x
 
3.4.81.8 Giac [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.90 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {{\left (e x + d\right )} b g n^{2} \log \left (e x + d\right )^{2}}{e} - \frac {2 \, {\left (e x + d\right )} b g n^{2} \log \left (e x + d\right )}{e} + \frac {2 \, {\left (e x + d\right )} b g n \log \left (e x + d\right ) \log \left (c\right )}{e} + \frac {2 \, {\left (e x + d\right )} b g n^{2}}{e} + \frac {{\left (e x + d\right )} b f n \log \left (e x + d\right )}{e} + \frac {{\left (e x + d\right )} a g n \log \left (e x + d\right )}{e} - \frac {2 \, {\left (e x + d\right )} b g n \log \left (c\right )}{e} + \frac {{\left (e x + d\right )} b g \log \left (c\right )^{2}}{e} - \frac {{\left (e x + d\right )} b f n}{e} - \frac {{\left (e x + d\right )} a g n}{e} + \frac {{\left (e x + d\right )} b f \log \left (c\right )}{e} + \frac {{\left (e x + d\right )} a g \log \left (c\right )}{e} + \frac {{\left (e x + d\right )} a f}{e} \]

input
integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="giac 
")
 
output
(e*x + d)*b*g*n^2*log(e*x + d)^2/e - 2*(e*x + d)*b*g*n^2*log(e*x + d)/e + 
2*(e*x + d)*b*g*n*log(e*x + d)*log(c)/e + 2*(e*x + d)*b*g*n^2/e + (e*x + d 
)*b*f*n*log(e*x + d)/e + (e*x + d)*a*g*n*log(e*x + d)/e - 2*(e*x + d)*b*g* 
n*log(c)/e + (e*x + d)*b*g*log(c)^2/e - (e*x + d)*b*f*n/e - (e*x + d)*a*g* 
n/e + (e*x + d)*b*f*log(c)/e + (e*x + d)*a*g*log(c)/e + (e*x + d)*a*f/e
 
3.4.81.9 Mupad [B] (verification not implemented)

Time = 1.34 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.93 \[ \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx={\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (b\,g\,x+\frac {b\,d\,g}{e}\right )+x\,\left (a\,f-a\,g\,n-b\,f\,n+2\,b\,g\,n^2\right )+x\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (a\,g+b\,f-2\,b\,g\,n\right )+\frac {\ln \left (d+e\,x\right )\,\left (a\,d\,g\,n-2\,b\,d\,g\,n^2+b\,d\,f\,n\right )}{e} \]

input
int((a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)),x)
 
output
log(c*(d + e*x)^n)^2*(b*g*x + (b*d*g)/e) + x*(a*f - a*g*n - b*f*n + 2*b*g* 
n^2) + x*log(c*(d + e*x)^n)*(a*g + b*f - 2*b*g*n) + (log(d + e*x)*(a*d*g*n 
 - 2*b*d*g*n^2 + b*d*f*n))/e